<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>游戏规则--嘉信城市广场红包H5游戏</title>
    <meta name="description" content="万元红包任你抢，智能游戏乐无穷" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <link rel="stylesheet" href="/public/style/globe.css">
    <link rel="stylesheet" href="/public/shopred/style/style.css">
</head>
<body>
<img src="http://nowechat.oss-cn-shenzhen.aliyuncs.com/wechat/shopred/img/hongbaoicon.jpg" style="display: none">
<table>
    <% dataList.forEach(function(item){ %>
    <tr>
        <td><%= item.id %></td>
        <td><%= item.nickname %></td>
        <td><img src="<%= item.uploadImg %>" style="width: 1rem;"></td>
        <% if(item.status==1){ %>
            <td><button style="background: #aaaaaa;">已加入黑名单</button> </td>
        <% }else{ %>
            <td><button onclick="addBack('<%= item.userId %>','<%= item.ip %>')">加入黑名单</button> </td>
        <% } %>


        <td><%= item.remark %></td>
    </tr>
    <% }) %>
</table>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>


function addBack(id,ip) {
    $.post('/app/shopred/addback',{id:id,ip:ip},function (data) {
        if(data && data.status){
            alert('已加入黑名单');
        }
    },'JSON');
}


</script>
</body>
</html>